import java.util.Arrays;
import java.util.Date;
import static java.lang.Math.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2023-10-08
 * Time: 14:32
 */

class Student {
    private String name;

    private int age;

    private static String classRoom = "301";



    public Student(String name, int age, String classRoom) {
        this.name = name;
        this.age = age;
        // this.classRoom = classRoom;
    }

    public Student() {
        //this("yun long",18);
        System.out.println("没有参数的构造方法");
    }

    public Student(String name, int age) {
        //this("yun long",18);
        this.name = name;
        this.age = age;
        System.out.println("带两个参数的构造方法!");
    }

    public void doClass() {
        //this.print();
        System.out.println(this.name + "在上课!");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void print() {
        funStatic();
        System.out.println("姓名: " + this.name + " 年龄: " + this.age);
    }

    public static void funStatic() {
        //print();
        /*Student student1 = new Student("zhang san",18);
        student1.print();*/

        System.out.println("funStatic()........");
    }

    public static String getClassRoom() {
        return classRoom;
    }
}

public class TestDemo {

    public static void main(String[] args) {
        Student student1 = new Student("zhang san",18, "301");
        student1.print();
    }

    public static void func1() {

    }

    static boolean abc;

    private int count;


    public static void main8(String[] args) {
        //System.out.println("教室是: " + Student.getClassRoom());
        //System.out.println(abc);
        TestDemo test = new TestDemo(88);
        System.out.println(test.count);
    }

    TestDemo(int a) {

        count=a;

    }

    public static void main7(String[] args) {
        /*Test test = new Test();
        test.func1();*/
        func1();
    }

    public static void main6(String[] args) {
        Student student1 = new Student("zhang san",18, "301");
        Student student2 = new Student("lisi",6, "301");
        Student student3 = new Student("wang wu",28, "301");
        /*System.out.println("教室是："+student1.classRoom);
        System.out.println("教室是："+student2.classRoom);
        System.out.println("教室是："+student3.classRoom);*/

    }

    public static void main5(String[] args) {
        Student student = new Student();
        //student.name = "zhang san";
        student.setName("zhang san");
        //student.age = 10;
        student.setAge(10);
        System.out.println(student.getName());
        student.print();
    }

    public static void main4(String[] args) {
        double x = 19.9;
        double y = 90.0;
        //double result = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
        double result = sqrt(pow(x, 2) + pow(y, 2));
        System.out.println(result);
    }

    public static void main3(String[] args) {
        Date date = new Date();
        int[] array = {1,2,3,4};
        System.out.println(Arrays.toString(array));
    }

    public static void main2(String[] args) {
        Student student = new Student();

        student.doClass();

        /*System.out.println("=============");
        Student student1 = new Student("lisi",19);
        student1.print();*/
    }

    public static void main1(String[] args) {
        Student student = new Student();
        student.print();



    }

}
